package com.alks.function.mapper.pcfactorywork;

import com.alks.entity.data.entity.PcMtlCheck;
import com.alks.entity.data.entity.PcSupplementMtl;
import com.alks.function.data.dto.pcfactorywork.PcSupplementMtlDto;
import com.alks.function.data.dto.stockdept.pcfactorystockwork.PurUnSentDto;
import com.alks.function.data.request.stockdept.pcfactorystockwork.AddPurSendRequest;
import com.alks.function.data.request.stockdept.pcfactorystockwork.MpPurDisRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 补料审核--补料明细 Mapper 接口
 * </p>
 *
 * @author ms
 * @since 2023-07-19
 */
public interface PcSupplementMtlMapper extends BaseMapper<PcSupplementMtl> {

    /**
     * 补单查询作业
     * 补料明细
     * @param slipNo 补单号
     * @return 补单材料
     */
    List<PcSupplementMtlDto> getSupplementaryMaterialDetail(@Param("slipNo") String slipNo);

    /**
     * 补单暂收入库查询
     *
     * @param request   查询条件
     * @param companyId 公司id
     * @return 未收入库数据
     */
    List<PurUnSentDto> getPurSpUnSentQuery(@Param("request") MpPurDisRequest request, @Param("companyId") String companyId);

    /**
     * 补单暂收入库查询
     * @param request 查询条件
     * @param companyId 公司id
     * @return 未收入库数量和
     */
    Map<String, BigDecimal> getSpUnSentSumQuery(@Param("request") MpPurDisRequest request, @Param("companyId") String companyId);

    /**
     * 补单暂收入库所需数据查询
     */
    List<PcMtlCheck> getPurSentQuery(@Param("request") List<AddPurSendRequest> request, @Param("companyId") String companyId);
}
